package cn.com.yang.decorator.service.impl;

import cn.com.yang.decorator.bean.Books;
import cn.com.yang.decorator.service.BookService;

/**
 * @Desc<日志增强>
 * @Author 杨亿金
 * @Date 2020/8/30 18:29
 * @CopyRight
 * @Version
 */
public class BookLogServiceImpl implements BookService {
    private BookService bookService;
    public BookLogServiceImpl(BookService bookService){
        this.bookService = bookService;
    }
    @Override
    public void addOne(Books book) {
        System.out.println("准备新增一本书");
        this.bookService.addOne(book);
        System.out.println("新增一本书成功");
    }

    @Override
    public void delOne(Books book) {
        System.out.println("准备删除一本书");
        this.bookService.delOne(book);
        System.out.println("删除一本书成功");
    }
}
